<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>学知鸟-形状</title>
		<link rel="shortcut icon" href="../../share/img/logo.png">
		<link rel="stylesheet" href="../../share/css/main.css">
		<style>
			.demo1 {
				width: 150px;
				height: 50px;
				border: 1px solid blue;
				background-color: aliceblue;
				display: flex;
				justify-content: center;
				align-items: center;
				clip-path: polygon(30px 0, 100% 0, 100% 100%, 0 100%, 0 30px);
				position: relative;
			}
			.demo1::after{
				content: "";
				width: calc(100%-10px);
				height: calc(100%-10px);
				position: absolute;
				left: 50%;
				top: 50%;
				transform: translate(-50%, -50%);
				z-index: -1;
				border-radius: 5px;
				background-color: red;
				clip-path: polygon(30px 0, 100% 0, 100% 100%, 0 100%, 0 30px);
			}
		</style>
	</head>
	<body>
		<div class="row">
			<div class="col-1">
				<section>
					<h3>形状</h3>
					<ul class="d-list">
						<li>clip-path： 设置裁剪区域</li>
					</ul>
				</section>
			</div>
			<div class="col-1">
				<section>
					<div class="demo1">
						<span>clip-path</span>
					</div>
				</section>
			</div>
			<div class="col-1">

			</div>
		</div>
	</body>
</html>
